package HomeWork;
/*
编写一个Student类，包含name、gender、age、id、score属性，分别为String、String、int、int、double类型。
类中声明一个say方法，该方法用于展示对象的所有信息。
 */
class Student {
    private String name;
    private String gender;
    private int age;
    private int id;
    private double score;

    private String major;//第六题用
//构造器===============================================================================
    public Student(){

    }

    public Student(String name,String gender, int age, int id, double score){
        this.name = name;
        this.id = id;
        this.age = age;
        this.gender = gender;
        this.score = score;
    }

    //第六题用
    public Student(String name, String gender, int age, String major) {
        this.name = name;
        this.gender = gender;
        this.age = age;
        this.major = major;
    }

    //get&set======================================================================
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    //方法============================================================================
    public void say(){
        System.out.println("姓名："+this.name);
        System.out.println("性别："+this.gender);
        System.out.println("年龄："+this.age);
        System.out.println("编号："+this.id);
        System.out.println("分数："+this.score);
    }

    //第六题用
    public void study(){
        System.out.println(this.name+"正在学习.......");
    }

    public void show(){
        System.out.print(this.name);
        System.out.print(" "+this.gender);
        System.out.print(" "+this.age);
        System.out.println(" "+this.major);
    }
}
